<T:ViewBase x:Class="WPFExcelReport.TTPUWC02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWTUID:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWTUID}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWEWLFDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWEWLFDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWRWLFDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWRWLFDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWWAKZ:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWWAKZ}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWKUNDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWKUNDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWWERK:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWWERK}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWABT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWABT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWVAR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWVAR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=TPWDPART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwTPUWC.TPWDPART}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsTPUWC,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwTPUWC}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwTPUWC, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="TPWMANDANT"
                                    Binding="{Binding Path=TPWMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWTUID"
                                    Binding="{Binding Path=TPWTUID, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWTUID}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWEWLFDNR"
                                    Binding="{Binding Path=TPWEWLFDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWEWLFDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWRWLFDNR"
                                    Binding="{Binding Path=TPWRWLFDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWRWLFDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWWAKZ"
                                    Binding="{Binding Path=TPWWAKZ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWWAKZ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWKUNDNR"
                                    Binding="{Binding Path=TPWKUNDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWKUNDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWWERK"
                                    Binding="{Binding Path=TPWWERK, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWWERK}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWABT"
                                    Binding="{Binding Path=TPWABT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWABT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWART"
                                    Binding="{Binding Path=TPWART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWVAR"
                                    Binding="{Binding Path=TPWVAR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWVAR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWDPART"
                                    Binding="{Binding Path=TPWDPART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWDPART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWNETGEW"
                                    Binding="{Binding Path=TPWNETGEW, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWNETGEW}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWBSTIPKT"
                                    Binding="{Binding Path=TPWBSTIPKT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWBSTIPKT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWBSTKORR"
                                    Binding="{Binding Path=TPWBSTKORR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWBSTKORR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWAUFKRS"
                                    Binding="{Binding Path=TPWAUFKRS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWAUFKRS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWAUFLFD"
                                    Binding="{Binding Path=TPWAUFLFD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWAUFLFD}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWAUFPOS"
                                    Binding="{Binding Path=TPWAUFPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWAUFPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWLWDATE"
                                    Binding="{Binding Path=TPWLWDATE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWLWDATE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWLWTIME"
                                    Binding="{Binding Path=TPWLWTIME, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWLWTIME}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWBENID"
                                    Binding="{Binding Path=TPWBENID, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWBENID}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWTERM"
                                    Binding="{Binding Path=TPWTERM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWTERM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="TPWFILLER"
                                    Binding="{Binding Path=TPWFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=TPWFILLER}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
